return "ROLLOVER CURSOR CHANGE" & RETURN & RETURN & "Changes the cursor when the mouse rolls over the current sprite. " & "Choose one of the pointers included with Director, or specify two 1-bit 16x16 pixel bitmap members: one to act as the pointer image, the other to define the transparent/opaque areas of the cursor." & RETURN & RETURN & "TIPS:" & RETURN & "Place a single pixel at the topRight and bottomLeft of the image itself to create what is in fact a 17x17 pixel bitmap. " & "These extra pixels will not appear in the cursor (they will be clipped) but the mask will align with them. " & "This ensures that the opaque area surrounds the cursor image correctly." & RETURN & RETURN & "Set the regPoint of the image to define the cursor's hotspot." & RETURN & RETURN & "PARAMETERS:" & RETURN & "* EITHER - Use one of Director's built-in cursors." & RETURN & RETURN & "* OR - Use your own bitmap images." & RETURN & "* Custom Image " & RETURN & "* Custom Mask" & RETURN & RETURN & "To use custom images, ensure that " & QUOTE & "1 bit bitmap" & QUOTE & " is selected as the type of cursor."
end
on getBehaviorTooltip me
return "Use with graphic members." & RETURN & RETURN & "Modifies the cursor when the mouse rolls over a sprite." & RETURN & RETURN & "You can use built-in or custom images for the cursor."
end
on beginSprite me
SetSpriteCursor(me)
end
on endSprite me
mySprite.cursor = mySavedCursor
end
on SetSpriteCursor me
mySprite = sprite(me.spriteNum)
mySavedCursor = mySprite.cursor
if voidp(myCursorType) then
mySprite.cursor = myBuiltInCursor
exit
end if
case myCursorType of
"Built-in cursor":
mySprite.cursor = myBuiltInCursor
"Cursor Member":
myCursorMember = value(myCursorMember)
cursorList = [myCursorMember.number]
mySprite.cursor = cursorList
"1 bit bitmap":
myCustomCursor = value(myCustomCursor)
cursorList = [myCustomCursor.number]
if myCustomMask <> "no mask" then
myCustomMask = value(myCustomMask)
cursorList.append(myCustomMask.number)
end if
mySprite.cursor = cursorList
end case
end
on isOKToAttach me, aSpriteType, aSpriteNum
case aSpriteType of
#graphic:
return 1
#script:
return 0
end case
end
on getPropertyDescriptionList me
if not (the currentSpriteNum) then
exit
end if
propertyDescriptionList = [:]
cursorTypes = []
cursorMembersList = GetCursorMembers(me)
cursorBitmapsList = GetCursorBitmaps(me)
cursorMasksList = duplicate(cursorBitmapsList)
cursorMasksList.addAt(1, "no mask")
cursorMembers = cursorMembersList.count()
bitmapCursors = cursorBitmapsList.count()
if cursorMembers then
cursorTypes.append("Cursor Member")
end if
if bitmapCursors then
cursorTypes.append("1 bit bitmap")
end if
if cursorTypes.count() then
cursorTypes.addAt(1, "Built-in cursor")
propertyDescriptionList.addProp(#myCursorType, [#comment: "CHOICE OF TYPE - Use which type of cursor?", #format: #string, #range: cursorTypes, #default: cursorTypes[1]])